-- 插件
require("plugin")

-- vim 基础配置
vim.opt.foldmethod = "syntax"
vim.opt.foldlevelstart = 99
-- vim.opt.smartindent = true
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.number = true
vim.opt.termguicolors = true
vim.opt.backupdir = vim.fn.expand("~/.tmp/backup")
vim.opt.directory = vim.fn.expand("~/.tmp/swp")
vim.opt.splitbelow = true
vim.opt.splitright = true
vim.opt.lazyredraw = true
vim.opt.showmode = false
vim.opt.incsearch = true
vim.opt.ignorecase = true
vim.opt.smartcase = true
vim.opt.undofile = true
vim.opt.undodir = vim.fn.expand("~/.tmp")
vim.opt.mouse = "a"
vim.opt.errorbells = false
vim.opt.visualbell = true
-- vim.opt.t_vb = ""
vim.opt.cursorline = true
vim.opt.inccommand = "nosplit"
-- vim.opt.background = "dark"
vim.opt.autoread = true
-- 关闭自动折行
vim.opt.wrap = false
-- 滚动时上下保留行
vim.o.scrolloff = 5
vim.o.backspace = "2"
-- 编码
vim.o.encoding = "UTF-8"
-- 显示匹配的空格
vim.o.showmatch = true

require("my.treesitter").setup()
require("my.cmp").setup()
require("my.lsp").setup()
require("my.fuzzy").setup()
require("my.filetree").setup()
require("my.keymap").setup()
require("my.comment").setup()
require("my.statusbar").setup()
require("my.theme").setup()
require("my.git").setup()
require("my.other").setup()
require("my.snippet").setup()
